<#-- 显示登录按钮 -->
<#include "/WEB-INF/default/fragment/header.ftl">
    <div class="header clearfix">
          <a href="${request.contextPath}/index.action">教学系统</a>
          <div class="top_btn">
            <#if Session?? && Session.user??>
              <div class="username">
                ${Session.user.username!""}
              </div>
              <ul class="userm">
                <li></li>
                <li><a href="${request.contextPath}/my-info.action">我的信息</a></li>
                <li><a href="${request.contextPath}/log-logout.action">退出登录</a></li>
              </ul>
            <#else>
              <button class="btn btn-info">
                <a href="${request.contextPath}/log-login.action">登录</a>
              </button>
              <button class="btn btn-warning">
                <a href="${request.contextPath}/reg-info.action">注册</a>
              </button>
            </#if>
          </div>
          
          <script type="text/javascript">
            $(function(){
              $('.username').bind('click', function(event) {
                $(this).next().show();
              });
              $('.userm').bind('click', function(event) {
                $('.userm').hide();
              });
            });
          </script>
    </div>